package cn.com.yusys.yusp.message.domain;

import cn.com.yusys.yusp.commons.mapper.domain.BaseDomain;
import java.io.Serializable;
import javax.persistence.*;

@Table(name = "MESSAGE_CONTENT")
public class MessageContent extends BaseDomain implements Serializable {
    @Column(name = "EVENT_NO")
    private String eventNo;

    @Column(name = "MESSAGE_TYPE")
    private String messageType;

    @Column(name = "CHANNEL_TYPE")
    private String channelType;

    @Column(name = "EMAIL_TITLE")
    private String emailTitle;

    @Column(name = "SEND_NUM")
    private Short sendNum;

    @Column(name = "TIME_START")
    private String timeStart;

    @Column(name = "TIME_END")
    private String timeEnd;

    @Column(name = "CONTENT")
    private String content;

    private static final long serialVersionUID = 1L;

    /**
     * @return EVENT_NO
     */
    public String getEventNo() {
        return eventNo;
    }

    /**
     * @param eventNo
     */
    public void setEventNo(String eventNo) {
        this.eventNo = eventNo == null ? null : eventNo.trim();
    }

    /**
     * @return MESSAGE_TYPE
     */
    public String getMessageType() {
        return messageType;
    }

    /**
     * @param messageType
     */
    public void setMessageType(String messageType) {
        this.messageType = messageType == null ? null : messageType.trim();
    }

    /**
     * @return CHANNEL_TYPE
     */
    public String getChannelType() {
        return channelType;
    }

    /**
     * @param channelType
     */
    public void setChannelType(String channelType) {
        this.channelType = channelType == null ? null : channelType.trim();
    }

    /**
     * @return EMAIL_TITLE
     */
    public String getEmailTitle() {
        return emailTitle;
    }

    /**
     * @param emailTitle
     */
    public void setEmailTitle(String emailTitle) {
        this.emailTitle = emailTitle == null ? null : emailTitle.trim();
    }


    /**
     * @return SEND_NUM
     */
    public Short getSendNum() {
        return sendNum;
    }

    /**
     * @param sendNum
     */
    public void setSendNum(Short sendNum) {
        this.sendNum = sendNum;
    }

    /**
     * @return TIME_START
     */
    public String getTimeStart() {
        return timeStart;
    }

    /**
     * @param timeStart
     */
    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart == null ? null : timeStart.trim();
    }

    /**
     * @return TIME_END
     */
    public String getTimeEnd() {
        return timeEnd;
    }

    /**
     * @param timeEnd
     */
    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd == null ? null : timeEnd.trim();
    }

    /**
     * @return CONTENT
     */
    public String getContent() {
        return content;
    }

    /**
     * @param content
     */
    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageContent other = (MessageContent) that;
        return (this.getEventNo() == null ? other.getEventNo() == null : this.getEventNo().equals(other.getEventNo()))
            && (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
            && (this.getChannelType() == null ? other.getChannelType() == null : this.getChannelType().equals(other.getChannelType()))
            && (this.getEmailTitle() == null ? other.getEmailTitle() == null : this.getEmailTitle().equals(other.getEmailTitle()))
            && (this.getSendNum() == null ? other.getSendNum() == null : this.getSendNum().equals(other.getSendNum()))
            && (this.getTimeStart() == null ? other.getTimeStart() == null : this.getTimeStart().equals(other.getTimeStart()))
            && (this.getTimeEnd() == null ? other.getTimeEnd() == null : this.getTimeEnd().equals(other.getTimeEnd()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEventNo() == null) ? 0 : getEventNo().hashCode());
        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
        result = prime * result + ((getChannelType() == null) ? 0 : getChannelType().hashCode());
        result = prime * result + ((getEmailTitle() == null) ? 0 : getEmailTitle().hashCode());
        result = prime * result + ((getSendNum() == null) ? 0 : getSendNum().hashCode());
        result = prime * result + ((getTimeStart() == null) ? 0 : getTimeStart().hashCode());
        result = prime * result + ((getTimeEnd() == null) ? 0 : getTimeEnd().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eventNo=").append(eventNo);
        sb.append(", messageType=").append(messageType);
        sb.append(", channelType=").append(channelType);
        sb.append(", emailTitle=").append(emailTitle);
        sb.append(", sendNum=").append(sendNum);
        sb.append(", timeStart=").append(timeStart);
        sb.append(", timeEnd=").append(timeEnd);
        sb.append(", content=").append(content);
        sb.append("]");
        return sb.toString();
    }
}